home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / FGL304E.ZIP;1 / EXPAS.ARJ / FGDOC / EXAMPLES / PASCAL / 12-03.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1994-01-24  |  758 b   |  44 lines

  1. program main;
  2. uses fgmain, fgmisc;
  3.  
  4. var
  5.   old_mode : integer;
  6.   x        : integer;
  7.  
  8. begin
  9.  
  10.   { initialize the video environment }
  11.  
  12.   if (fg_testmode(13,1) = 0) then
  13.   begin
  14.     writeln('This program requires EGA.');
  15.     exit;
  16.   end;
  17.   old_mode := fg_getmode;
  18.   fg_setmode(13);
  19.   fg_setfunc(3);
  20.  
  21.   { draw some type of background }
  22.  
  23.   fg_setcolor(15);
  24.   fg_rect(0,319,0,199);
  25.  
  26.   { move the object across the screen }
  27.  
  28.   fg_setcolor(10 xor 15);
  29.   for x := -20 to 319 do
  30.   begin
  31.     if (x mod 5 = 0) then
  32.     begin
  33.       fg_clprect(x,x+19,95,104);
  34.       fg_waitfor(1);
  35.       fg_clprect(x,x+19,95,104);
  36.     end;
  37.   end;
  38.  
  39.   { restore the original video mode and return to DOS }
  40.  
  41.   fg_setmode(old_mode);
  42.   fg_reset;
  43. end.
  44.